package com.dgut.forum.exception;

import com.dgut.forum.common.AppResult;
import com.dgut.forum.common.ResultCode;

/*
*统一异常类型
* */
public class ApplicationException extends RuntimeException{

    protected AppResult errorResult;


    public ApplicationException(String message) {
        super(message);
    }

    public ApplicationException(String message, Throwable cause) {
        super(message, cause);
    }

    public ApplicationException(Throwable cause) {
        super(cause);
    }
    public ApplicationException(AppResult appResult) {
        super(appResult.getMessage());
        this.errorResult=appResult;
    }

    public AppResult getErrorResult() {
        return errorResult;
    }
}
